import {post, get} from '../utils/';
import * as types from '../constants/helperTypes';

/**
 * 获取城市列表
 * */
export function fetchGlobalConfig() {
    return (dispatch) => {
        return post('/api/configData',{name:1}).then(
            response => dispatch({
                type: types.FETCH_GLOBAL_CONFIG,
                data: response
            }),
            error => dispatch({
                type: types.FETCH_GLOBAL_CONFIG_FAILED,
                error
            })
        )
    }
}
